import fetch from '../utils/fetch';
import {isEmpty, formatDate} from '../utils/tool';
import BtnGroup from '@/components/modules/btnGroup'
import TableData from '@/components/modules/tableData.vue'
import XmDialog from '@/components/modules/xm-dialog.vue'
import Search from '@/components/modules/search.vue'
import {pageSize} from '@/config';
import buttonCode from '@/config/button-code';

export default {
    install(Vue) {
        // fetch请求
        Vue.prototype.$fetch = fetch;
        Vue.prototype.$isEmpty = isEmpty;
        Vue.prototype.$formatDate = formatDate;
        Vue.prototype.$pageSize = pageSize;
        Vue.prototype.$buttonCode = buttonCode;
        
        Vue.component(BtnGroup.name, BtnGroup);
        Vue.component(TableData.name, TableData);
        Vue.component(XmDialog.name, XmDialog);
        Vue.component(Search.name, Search);
    },
};
